Input event types.
Keyboard types.
Constants used to retrieve information about the range of motion for a particular coordinate of a motion event.
Input source masks.
Input sources.
Key event actions.
Key event flags.
Key states (may be returned by queries about the current state of a particular key code, scan code or switch).
Meta key / modifier state.
Motion event actions
Constants that identify each individual axis of a motion event. @anchor AMOTION_EVENT_AXIS
Constants that identify buttons that are associated with motion events. Refer to the documentation on the MotionEvent class for descriptions of each button.
Motion event edge touch flags.
Motion event flags.
Constants that identify tool types. Refer to the documentation on the MotionEvent class for descriptions of each tool type.
Get the id for the device that an input event came from.
Get the input event source.
Get the input event type.
Add this input queue to a looper for processing. See ALooper_addFd() for information on the ident, callback, and data params.
Remove the input queue from the looper it is currently attached to.
Report that dispatching has finished with the given event. This must be called after receiving an event with AInputQueue_get_event().
Returns the next available event from the queue. Returns a negative value if no events are available or an error has occurred.
Returns true if there are one or more events available in the input queue. Returns 1 if the queue has events; 0 if it does not have events; and a negative value if there is an error.
Sends the key for standard pre-dispatching -- that is, possibly deliver it to the current IME to be consumed before the app. Returns 0 if it was not pre-dispatched, meaning you can process it right now. If non-zero is returned, you must abandon the current event processing and allow the event to appear again in the event queue (if it does not get consumed during pre-dispatching).
Get the key event action.
Get the time of the most recent key down event, in the java.lang.System.nanoTime() time base. If this is a down event, this will be the same as eventTime. Note that when chording keys, this value is the down time of the most recently pressed key, which may not be the same physical key of this event.
Get the time this event occurred, in the java.lang.System.nanoTime() time base.
Get the key event flags.
Get the key code of the key event. This is the physical key that was pressed, not the Unicode character.
Get the meta key state.
Get the repeat count of the event. For both key up an key down events, this is the number of times the key has repeated with the first down starting at 0 and counting up from there. For multiple key events, this is the number of down/up pairs that have occurred.
Get the hardware key id of this key event. These values are not reliable and vary from device to device.
Get the combined motion event action code and pointer index.
Get the value of the request axis for the given pointer index.
Get the button state of all buttons that are pressed.
Get the time when the user originally pressed down to start a stream of position events, in the java.lang.System.nanoTime() time base.
Get a bitfield indicating which edges, if any, were touched by this motion event. For touch events, clients can use this to determine if the user's finger was touching the edge of the display.
Get the time when this specific event was generated, in the java.lang.System.nanoTime() time base.
Get the motion event flags.
Get the historical value of the request axis for the given pointer index that occurred between this event and the previous motion event.
Get the time that a historical movement occurred between this event and the previous event, in the java.lang.System.nanoTime() time base.
Get the historical orientation of the touch area and tool area in radians clockwise from vertical for the given pointer index that occurred between this event and the previous motion event. An angle of 0 degrees indicates that the major axis of contact is oriented upwards, is perfectly circular or is of unknown orientation. A positive angle indicates that the major axis of contact is oriented to the right. A negative angle indicates that the major axis of contact is oriented to the left. The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians (finger pointing fully right).
Get the historical pressure of this event for the given pointer index that occurred between this event and the previous motion event. The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure), although values higher than 1 may be generated depending on the calibration of the input device.
Get the historical raw X coordinate of this event for the given pointer index that occurred between this event and the previous motion event. For touch events on the screen, this is the original location of the event on the screen, before it had been adjusted for the containing window and views. Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise.
Get the historical raw Y coordinate of this event for the given pointer index that occurred between this event and the previous motion event. For touch events on the screen, this is the original location of the event on the screen, before it had been adjusted for the containing window and views. Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise.
Get the current scaled value of the approximate size for the given pointer index that occurred between this event and the previous motion event. This represents some approximation of the area of the screen being pressed; the actual value in pixels corresponding to the touch is normalized with the device specific range of values and scaled to a value between 0 and 1. The value of size can be used to determine fat touch events.
Get the historical length of the major axis of an ellipse that describes the size of the approaching tool for the given pointer index that occurred between this event and the previous motion event. The tool area represents the estimated size of the finger or pen that is touching the device independent of its actual touch area at the point of contact.
Get the historical length of the minor axis of an ellipse that describes the size of the approaching tool for the given pointer index that occurred between this event and the previous motion event. The tool area represents the estimated size of the finger or pen that is touching the device independent of its actual touch area at the point of contact.
Get the historical length of the major axis of an ellipse that describes the touch area at the point of contact for the given pointer index that occurred between this event and the previous motion event.
Get the historical length of the minor axis of an ellipse that describes the touch area at the point of contact for the given pointer index that occurred between this event and the previous motion event.
Get the historical X coordinate of this event for the given pointer index that occurred between this event and the previous motion event. Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise.
Get the historical Y coordinate of this event for the given pointer index that occurred between this event and the previous motion event. Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise.
Get the number of historical points in this event. These are movements that have occurred between this event and the previous event. This only applies to AMOTION_EVENT_ACTION_MOVE events -- all other actions will have a size of 0. Historical samples are indexed from oldest to newest.
Get the state of any meta / modifier keys that were in effect when the event was generated.
Get the current orientation of the touch area and tool area in radians clockwise from vertical for the given pointer index. An angle of 0 degrees indicates that the major axis of contact is oriented upwards, is perfectly circular or is of unknown orientation. A positive angle indicates that the major axis of contact is oriented to the right. A negative angle indicates that the major axis of contact is oriented to the left. The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians (finger pointing fully right).
Get the number of pointers of data contained in this event. Always >= 1.
Get the pointer identifier associated with a particular pointer data index in this event. The identifier tells you the actual pointer number associated with the data, accounting for individual pointers going up and down since the start of the current gesture.
Get the current pressure of this event for the given pointer index. The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure), although values higher than 1 may be generated depending on the calibration of the input device.
Get the original raw X coordinate of this event. For touch events on the screen, this is the original location of the event on the screen, before it had been adjusted for the containing window and views.
Get the original raw X coordinate of this event. For touch events on the screen, this is the original location of the event on the screen, before it had been adjusted for the containing window and views.
Get the current scaled value of the approximate size for the given pointer index. This represents some approximation of the area of the screen being pressed; the actual value in pixels corresponding to the touch is normalized with the device specific range of values and scaled to a value between 0 and 1. The value of size can be used to determine fat touch events.
Get the current length of the major axis of an ellipse that describes the size of the approaching tool for the given pointer index. The tool area represents the estimated size of the finger or pen that is touching the device independent of its actual touch area at the point of contact.
Get the current length of the minor axis of an ellipse that describes the size of the approaching tool for the given pointer index. The tool area represents the estimated size of the finger or pen that is touching the device independent of its actual touch area at the point of contact.
Get the tool type of a pointer for the given pointer index. The tool type indicates the type of tool used to make contact such as a finger or stylus, if known.
Get the current length of the major axis of an ellipse that describes the touch area at the point of contact for the given pointer index.
Get the current length of the minor axis of an ellipse that describes the touch area at the point of contact for the given pointer index.
Get the current X coordinate of this event for the given pointer index. Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise.
Get the X coordinate offset. For touch events on the screen, this is the delta that was added to the raw screen coordinates to adjust for the absolute position of the containing windows and views.
Get the precision of the X coordinates being reported. You can multiply this number with an X coordinate sample to find the actual hardware value of the X coordinate.
Get the current Y coordinate of this event for the given pointer index. Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise.
Get the Y coordinate offset. For touch events on the screen, this is the delta that was added to the raw screen coordinates to adjust for the absolute position of the containing windows and views.
Get the precision of the Y coordinates being reported. You can multiply this number with a Y coordinate sample to find the actual hardware value of the Y coordinate.
Bit shift for the action bits holding the pointer index as defined by AMOTION_EVENT_ACTION_POINTER_INDEX_MASK.
Meta key / modifier state.
@file input.h